home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #4 / Amiga Plus CD - 2000 - No. 4.iso / Tools / Libs / MCC_Textinput / Install_Textinput < prev    next >
Encoding:
Text File  |  2000-05-29  |  8.7 KB  |  194 lines

  1. ;******************************************************************************
  2. ;    ______                 __   ______                       __
  3. ;   /_  __/               _/ /_ /_  __/    MUI Classes      _/ /_
  4. ;    / /  ______ __  __  /  __/  / /  ______ ______ __  __ /  __/
  5. ;   / /  / ____/ \ \/ /  / /    / /  / __  // __  // / / / / /
  6. ;  / /  / __/_   /   /  / /_ __/ /_ / / / // /_/ // /_/ / / /_
  7. ; /_/  /_____/  /_/\_\ /___//_____//_/ /_// ____//_____/ /___/
  8. ;                                        / /           
  9. ; $VER: 0.40 (23-July-1999)             /_/  
  10. ; TextInput ©1997, 1998, 1999 by Oliver Wagner
  11. ; TextInput Installer by Robert C. Reiswig ©1997, 1998, 1999 
  12. ;
  13. ; If you wish to use any part of this installer you must ask. May not be 
  14. ; integrated/placed into any other package. You may NOT change this in an way!
  15. ; Changes, suggestions or problems: ti@vgr.com or rob@vapor.com
  16. ;******************************************************************************
  17.  
  18. ;*** System Stuff ***
  19. (set cpu (database "cpu"))  (set vblank (database "vblank"))
  20. (set graphmem (database "graphics-mem")) (set totmem (database "total-mem"))
  21. (set osver (/ (getversion "LIBS:version.library") 65536))
  22. (if (= vblank "60") ((set blank "NTSC")) ((set blank "PAL")))
  23. (set fastmem (- totmem graphmem))
  24.  
  25. (if (= osver 37) (set workbench "2.0")) (if (= osver 38) (set workbench "2.1"))
  26. (if (= osver 39) (set workbench "3.0")) (if (= osver 40) (set workbench "3.1"))
  27. (if (= osver 41) (set workbench "3.5")) 
  28.  
  29. (set cpu (database "cpu"))
  30. (if (= cpu 68000) (set #cpu 0)) (if (= cpu 68010) (set #cpu 1))
  31. (if (= cpu 68020) (set #cpu 2)) (if (= cpu 68030) (set #cpu 3))
  32. (if (= cpu 68040) (set #cpu 4)) (if (> (exists ("sys:libs/68060.library")) 0) (set #cpu 5) )
  33.  
  34. ;Check for MUI stuff in 'Libs' or 'MUI/Libs'
  35.  (if (exists "Libs/MUI") (set mui_localdir "Libs/MUI"))
  36.  (if (exists "MUI") (set mui_localdir "MUI"))
  37.  
  38. (set vernum1 (getversion (tackon mui_localdir "Textinput.mcc")))
  39. (set ver1 (/ vernum1 65536)) (set rev1 (- vernum1 (* ver1 65536) ) )
  40. (set TextInputver (cat ver1 "." rev1))
  41.  
  42. ;********************************************************************
  43. ; English Strings
  44. ;********************************************************************
  45. (set #about (cat "\n\n\n\nWelcome to TextInput " TextInputver "\n\nCopyright ©1997-1999 by\n\nOliver Wagner\n<owagner@vapor.com>\n") )
  46. (set #whattodo "\n\n\n\n\nThis installer will copy or update the TextInput classes in MUI:Libs/MUI if needed.")
  47. (set #nomui (cat "\n\nTextInput uses Magic User Interface (MUI).\n\nThe installer has not found MUI: to be assigned, "
  48.                  "therefore you TextInput will not work correctly.  You will need to install "
  49.                  "MUI before running TextInput."
  50.             )
  51. )
  52. (set #updateinstaller "\nJust to let you know ESCOM AG has released a new version of the installer program.\n\n\nVersion 43.3 can be found on Aminet in:\n\n/util/misc/Installer-43_3.lha\n\n\nYou might want to upgrade soon, if you can. The TextInput installer will need it. Older installers might fail.")
  53. (set #updatingmuic "\nUpdating the MUI Classes if needed.\n\n(#?.mcc & #?.mcp)")
  54. (set #newermui "\nTextInput needs version 3.8 or higher of MUI installed to work correctly.\n\nNow would be a good time to Upgrade!\n\nYou can find the new MUI on Aminet in util/libs\n\nIt looks like you have: \n\n")
  55. (set #nompc "\nThe .MCC files for TextInput can not be installed to 'mui:libs/mui'")
  56. (set #byebye (cat "\nTextInput Install Complete!\n\n" ))
  57. (set #cpuver "\nWhat version of TextInput would you like to be installed?\n")
  58.  
  59. (set #updatedlibs "\nInstall/Update the Vapor Libraries?\n* = Must be installed to work correctly\n(Click 'Help' for more info on the libs.)\n")
  60. (set #lib1 " Update library")
  61. (set #lib2 " Toolkit library (*)")
  62. (set #lib3 " Registration library")
  63. (set #libhelp1 "\n\nvapor_update.library:\nIf installed every Vapor app will automagically check for updates by querying the Vapor server via Internet. You will be informed and offered automatic downloading if there is an update.")
  64. (set #libhelp2 "\n\nvapor_toolkit.library:\nContains support functions which are used by most Vapor applications and thus can be shared to reduce individual application code size. ie: Async I/O library, crytographically strong random number generator, math support.")
  65. (set #libhelp3 "\n\nvapor_registration.library:\nContains the core code for the registration utility\n")
  66. (set #wherelibs "Where do you wish to place the Vapor lib(s), 'Libs:' is default.")
  67. (set #flushing "\n\nRunning:\n\n'avail flush >NIL:'\n\n to try to flush old Vapor libraries from memory.")
  68.  
  69. ;********************************************************************
  70. ; Hello
  71. ;********************************************************************
  72. (message #about)
  73. (welcome) 
  74. (message #whattodo)
  75.  
  76. ;********************************************************************
  77. ; MUI installed?
  78. ;********************************************************************
  79. (if (< (exists "mui:") 2)  (message #nomui) )
  80.  
  81. ;********************************************************************
  82. ; Check on New installer 
  83. ;********************************************************************
  84. (set InstallerVer 0) (set current_installer "43.3")
  85. (set vernum1 @installer-version) (set ver1 (/ vernum1 65536)) 
  86. (set rev1 (- vernum1 (* ver1 65536) ) ) (set InstallerVer (cat ver1 "." rev1))
  87. (if (< InstallerVer current_installer) (message #updateinstaller) )
  88.  
  89. ;********************************************************************
  90. ; Copy over #?.mpc|#?.mcc (Need to be in mui:libs/mui)
  91. ;********************************************************************
  92. (if (> #cpu 1) (set guesscpu 1) (set guesscpu 0)) 
  93.  
  94. (if (<> (getassign "mui") "")
  95. (
  96.   (if (> (exists "mui:libs/mui") 0) 
  97.    (
  98.  
  99.     (if (> (exists (tackon mui_localdir "Textinput.mcc.020")) 0)
  100.       (set whatver (askchoice (choices  "68000" "68020")
  101.                       (prompt #cpuver)
  102.                   (help   #cpuver)
  103.                       (default guesscpu)
  104.                )
  105.       )
  106.     )
  107.  
  108.     (working #updatingmuic)
  109.     (foreach mui_localdir "#?.mcp"
  110.       (if (AND (= whatver 1) (exists (cat (tackon mui_localdir @each-name) ".020") ) )
  111.         (copylib (source (cat (tackon mui_localdir @each-name) ".020")) (dest "mui:libs/mui") (newname @each-name) (optional "nofail") ) 
  112.         (copylib (source (tackon mui_localdir @each-name)) (dest "mui:libs/mui") (optional "nofail") ) 
  113.       )
  114.     )
  115.  
  116.     (foreach mui_localdir "#?.mcc"
  117.        (if (AND (= whatver 1) (exists (cat (tackon mui_localdir @each-name) ".020") ) )
  118.         (copylib (source (cat (tackon mui_localdir @each-name) ".020")) (dest "mui:libs/mui") (newname @each-name) (optional "nofail") ) 
  119.         (copylib (source (tackon mui_localdir @each-name)) (dest "mui:libs/mui") (optional "nofail") ) 
  120.        )  
  121.     )
  122.    )
  123.  
  124.    (message (cat #newermui muiver #nompc)) 
  125.   )
  126. )
  127. )
  128.  
  129. ;********************************************************************
  130. ; Copy update Lib if wanted 
  131. ;********************************************************************
  132. (set deflibs 7)
  133. (if (> (exists "libs") 0)
  134.  (
  135.   (set deflibs 0)
  136.   (if (> (exists (tackon "libs" "vapor_update.library")) 0)       (set deflibs (+ deflibs 1)))
  137.   (if (> (exists (tackon "libs" "vapor_toolkit.library")) 0)      (set deflibs (+ deflibs 2)))
  138.   (if (> (exists (tackon "libs" "vapor_registration.library")) 0) (set deflibs (+ deflibs 4)))
  139.  
  140.   (set libPick (askoptions (choices #lib1 #lib2 #lib3)
  141.               (prompt #updatedlibs)
  142.                       (help   (cat #libhelp1 #libhelp2 #libhelp3))
  143.                     (default deflibs)
  144.            )
  145.   )
  146.  
  147.   (if (> libPick 0)
  148.    (
  149.     (set wherelibs (askdir (prompt #wherelibs)
  150.                   (help   #wherelibs)
  151.                        (default "LIBS:")
  152.                    )  
  153.     )
  154.     
  155.    (if (IN libPick 0)
  156.      (if (> (exists (tackon "Libs" "vapor_update.library")) 0)
  157.       (copylib (source (tackon "Libs" "vapor_update.library")) (dest wherelibs) (optional "nofail"))  
  158.      )
  159.     )
  160.  
  161.     (if (IN libPick 1)
  162.      (if (> (exists (tackon "Libs" "vapor_toolkit.library")) 0)
  163.       (copylib (source (tackon "Libs" "vapor_toolkit.library")) (dest wherelibs) (optional "nofail"))  
  164.      )
  165.     )
  166.  
  167.     (if (IN libPick 2)
  168.      (if (> (exists (tackon "Libs" "vapor_registration.library")) 0)
  169.       (copylib (source (tackon "Libs" "vapor_registration.library")) (dest wherelibs) (optional "nofail"))  
  170.      )
  171.     )
  172.  
  173.    (working #flushing)
  174.    (run "avail flush > NIL:")
  175.    (run "avail flush > NIL:")
  176.    (run "avail flush > NIL:")
  177.  
  178.    )
  179.  
  180.   )
  181.  )
  182. )
  183.  
  184. ;********************************************************************
  185. ; End Bye 
  186. ;********************************************************************
  187. (if (> (exists ("c:multiview")) 0) (set #mpath "c:") )
  188. (if (> (exists ("sys:Utilities/multiview")) 0) (set #mpath "sys:Utilities") )
  189. (run (cat "run " #mpath "/multiview textinput.readme") )
  190.  
  191. (set @default-dest "MUI:Libs/mui")
  192.  
  193. (exit #byebye)
  194.